package com.demo.service.impl;

import com.demo.service.KafkaProducerServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;



@Service
public class KafkaProducerServerImpl implements KafkaProducerServer {

    private Logger logger = LoggerFactory.getLogger(KafkaProducerServerImpl.class);

    @Autowired
    private KafkaTemplate kafkaTemplate;

    @Override
    public void sendMesage(String message) {
        kafkaTemplate.send("test",message);
    }
}
